package lab02.test37;
//本科生
public class Undergraduate extends Student {
    double avg;

    public Undergraduate() {}

    public Undergraduate(String name, String type, double[] score, double avg) {
        super(name, type, score);
        this.avg = avg;
    }

    @Override
    public double avg() {
        avg = (score[0] + score[1] + score[2]) / score.length;
        return avg;
    }

    @Override
    public String by(){
        if (avg > 79){
            return "通过";
        }else
            return "不通过";
    }
}
